import http from './index'

// 购物车列表
export const getCartList = (userid: string) => http.post('/cart/list', { userid })

// 加入购物车 /cart/add
export const getAddCart = (userid: string, proid: string, num: string) => http.post('/cart/add', { userid, proid, num})

// 删除购物车单条数据
export const delCartHandler = (cartid: string) => http.post('/cart/remove', { cartid })

// 更新购物车数量
export const updataNum = (cartid: string, num: number) => http.post('/cart/updatenum', { cartid ,num})